package com.hx.timer;

import java.util.Timer;
import java.util.TimerTask;

/**
 * 描述：
 *
 * @author Minghua Chen
 * @date 2020-12-13 21:28
 */
public class TimerDemo {
    public static void main(String[] args) {
        Timer timer = new Timer("timer-demo", false);
        // timer.schedule(new TimerTask01(),3*1000);
        timer.schedule(new TimerTask01(), 3 * 1000, 1000);
    }

    static class TimerTask01 extends TimerTask {
        @Override
        public void run() {
            System.out.println("start run.....");
        }
    }
}
